﻿@model GameSchool.Models.LectureViewModel

@{
    ViewBag.Title = "ViewLectureTeacher";
    Layout = "~/Views/Shared/_LayoutTeacher.cshtml";
}

<h2>@Model.currentLecture.title</h2>

<iframe width="560" height="315" src='@Model.currentLecture.lectureFile' frameborder="0" allowfullscreen></iframe>
<div>@Model.currentLecture.description</div>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
<ul class="commentList">
@foreach (var comment in Model.comments)
{ 
    
    <li>
        <div class="commentBodeh">
            <a href="http://www.ru.is">@comment.userName</a>
            <span>@comment.commentBody</span>
                <div>
                <abbr title='@comment.CommentTime'>@comment.CommentTime.ToString("dd. MMMM HH:mm")</abbr>
                <div id ="likeButton">
                <a href="#">Líkar þetta!</a>
                  </div>
                </div>
        </div>
    </li>

}


<div id ="commentBox">
@Html.TextAreaFor(x => x.comment.commentBody, new { rows = "4", cols = "50" })
</div>
@Html.HiddenFor(x => x.currentLecture.lectureID)
<p>
<input type="submit" id="commentSubmit" value="Skrifa athugasemd" />
</p>
</ul>
    
}  

@section menu{

    <li>@Html.ActionLink("Courses Overview", "TeacherHome", "Teacher")</li> 
    <li>@Html.ActionLink("Edit Course", "CourseEdit", "Course", new { CID = Model.courseID }, null)</li>    
    <li>@Html.ActionLink("Edit Levels", "LevelEdit", "Level", new { CID = Model.courseID }, null)</li>
    <li>@Html.ActionLink("XP Asignment", "XPAsignment", "Home", new { CID = Model.courseID }, null)</li>
    <li>@Html.ActionLink("Achievements", "AssignAchievement", "Achievement", new { CID = Model.courseID }, null)</li>
}